<%@ page language="java" import="java.util.*,com.hs.core.utils.*,com.hs.chd.action.search.*" pageEncoding="utf-8"%>
<%
List datalist = (List)request.getAttribute("datalist");
   
   String pagenum = (String)request.getAttribute("pagenum");
   String pagecount = (String)request.getAttribute("pagecount");
   String totalcount = (String)request.getAttribute("totalcount");
   String pageStr = (String)request.getAttribute("pagestr");
   String yearstr = (String)request.getAttribute("yearstr");
 
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head> 
<%@ include file="../../include.jsp"%> 
<script src='<%=basePath%>thirtpart/jquery/jquery.blockUI.js'></script> 
<script src='<%=basePath%>app/js/search.js'></script> 
<script src="<%=basePath %>common/artDialog/artDialog.js?skin=blue"></script> 
<script type="text/javascript" src="<%=basePath %>common/artDialog/plugins/iframeTools.js"></script>
<script src="<%=basePath %>app/js/nav.js"></script> 
<style>.tac{text-align:center}</style>
<script language=JavaScript>  
var _add = art.dialog.defaults;
_add["drag"]=false;
_add['lock'] = true;
_add['fixed'] = true;
_add['yesText'] = 'yes';
_add['noText'] = 'no';
        $(function() {
            var total = <%=totalcount%>;
            $(".count").each(function() { 
                var $this = $(this);
                var count = parseFloat($this.text()); 
                var rate;
                if (total <= 0)
                    rate = "0%";
                else
                    rate = ((count / total) * 100).toFixed(2) + "%";
                var $process = $this.next("span").text(rate).next("div.process").children();
                try {
                    $process.animate({ width: rate }, 1000);
                }
                catch (e) { 
                    $process.width(rate);
                }
            });
        }); 
 
function simpleCaseSearch(condition){ 
	simpleSearch(condition,'<%=basePath%>');
}
function comflexCaseSearch(condition){ 
	comflexSearch(condition,'<%=basePath%>');
}
function loadTop10Herb(){
    art.dialog.open('<%=basePath%>stat/herbstat.do', { height: '50%', width: '50%',left: '60%',   
        top: '270px',  title: "中药使用前十名趋势统计", lock: false }, false);//打开子窗体
}
 
</script>
<style type="text/css">


</style>
</head>
<body>
<!--头部-->
<div class="header">
	<div class="logo"></div>
    <div class="banner"></div>
    <ul class="tool">
    		<li><a href="javaScript:func4nav('8','<%=basePath %>');" class="index">首页</a></li> 
    	<!-- li><a href="#" class="login">登录</a></li-->
        <li><a href="#" class="register">注册</a></li> 
                <li><a href="javaScript:logout('<%=basePath %>');" class="help">退出</a></li>
        
    </ul>
</div>
<!--/头部-->
<!--导航-->
<ul class="nav"> 
    <li><a href="javaScript:func4nav('1','<%=basePath %>');" class="nav-1">数据检索</a></li>     
	<li><a href="javaScript:func4nav('7','<%=basePath %>');" class="nav-7">按疾病统计</a></li>        
	<li   class="active"><a href="javaScript:func4nav('4','<%=basePath %>');" class="nav-4">按单味药统计</a></li>   
    <li><a href="javaScript:func4nav('5','<%=basePath %>');" class="nav-5">按穴位统计</a></li>      
    <li><a href="javaScript:func4nav('6','<%=basePath %>');" class="nav-6">按给药方式统计</a></li>        
    <li><a href="javaScript:func4nav('2','<%=basePath %>');" class="nav-2">按职称分级统计</a></li>
    <li><a href="javaScript:func4nav('3','<%=basePath %>');" class="nav-3">按行医年数统计</a></li>
</ul>
<!--/导航-->
<div class="content"> 
     <div class="main">
        <div class="title_wj">
        <span class="top"><a href="javaScript:loadTop10Herb();">Top10</a></span>
            在名家验案库中按单味药统计
        </div>
        <div class="qitem">
        
<script type="text/javascript">
     
        function ChangeQueryValue() {
            var yearstr = document.getElementById("yearstr").value;
            window.location = '<%=basePath%>stat/shstat.do?yearstr='+yearstr;
        } 
</script>
<div class="year">
 
</div>
   <%if(datalist != null && datalist.size()>0){
   		for(int i=0;i<datalist.size();i++){
             Map data = (Map)datalist.get(i);
             String herbname = (String)data.get("herbname");
             String cnum =  data.get("cnum")+"";
             int k = i%10;
   
    %>
                    <div class="aitem">
                        <div class="ainfortitle">
                           <%=herbname%><a href="javaScript:pageLocation('<%=herbname%>','<%=basePath %>','herbname');"   title="查看单味药名称为《<%=herbname%>》的相关医案">查看详情</a> 
                        </div>
                        <span class="count">
                            <%=cnum %></span>(<span></span>)
                        <div class="process">
                            <div class="bar<%=k%>">
                            </div>
                        </div>
                    </div>
     <%}}else{ %>
     
     <div class="aitem">
             没有可统计的数据！
     </div> 
     <%} %>
                
<div id="ctl00_cph_pgStatistic" class="pagearea">
<%=pageStr %>
</div>
</div>
</div>      
</div>
<!--版权-->
<div class="footer"><spring:message code="sys.copyright" /></div>
<!--/版权-->
</body>
</html>

<script>
loadTop10Herb();
</script>
